#!/bin/sh

echo "=============install-qt============"

axel -n 10 -o /tmp/ http://download.qt.io/official_releases/qt/5.9/5.9.4/qt-opensource-linux-x64-5.9.4.run
chmod +x /tmp/qt-opensource-linux-x64-5.9.4.run
/tmp/qt-opensource-linux-x64-5.9.4.run

cp Qt-Creator.desktop ~/.local/share/applications
echo "text/qtcreator=Qt-Creator.desktop;" >> ~/.local/share/applications/defaults.list
echo "application/vnd.nokia.qt.qmakeprofile=qtcreator.desktop" >> ~/.local/share/applications/mimeapps.list
sudo update-mime-database /usr/share/mime

sudo cp /usr/lib/x86_64-linux-gnu/qt5/plugins/platforminputcontexts/libfcitxplatforminputcontextplugin.so /opt/Qt5.9.4/Tools/QtCreator/lib/Qt/plugins/platforminputcontexts
sudo cp /usr/lib/x86_64-linux-gnu/qt5/plugins/platforminputcontexts/libfcitxplatforminputcontextplugin.so /opt/Qt5.9.4/5.9.4/gcc_64/plugins/platforminputcontexts
echo "===========install-qt end=========="
